package lab;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class Cards extends JPanel {

    JPanel cardPanel;
    CardLayout cl = new CardLayout();
    EastPanel eastPanel=new EastPanel();    
    CenterPanelRear centerPanelRear;
    CenterPanel centerPanel;
    

    public Cards(EastPanel eastPanel) {
        this.eastPanel=eastPanel;
        
        centerPanelRear = new CenterPanelRear(this.eastPanel);
        centerPanel = new CenterPanel(centerPanelRear,this.eastPanel);
        cardPanel = new JPanel();
        cardPanel.setLayout(cl);
        cardPanel.add(centerPanel, "1");
        cardPanel.add(centerPanelRear, "2");
        centerPanel.mouseClickOnTable(this);
    }

    public void searchGenreOnly(String genre) {
        centerPanel.searchGenreOnly(genre);
    }

    public void searchAnything(String anything) {
        centerPanel.searchAnything(anything);

    }
    
}